package com.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the cctype database table.
 * 
 */
@Entity
@Table(name="cctype")
@NamedQuery(name="Cctype.findAll", query="SELECT c FROM Cctype c")
public class Cctype implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String cctid;

	private String cctname;

	//bi-directional many-to-one association to Guanhuaicc
	@OneToMany(mappedBy="cctypeBean")
	private List<Guanhuaicc> guanhuaiccs;

	public Cctype() {
	}

	public String getCctid() {
		return this.cctid;
	}

	public void setCctid(String cctid) {
		this.cctid = cctid;
	}

	public String getCctname() {
		return this.cctname;
	}

	public void setCctname(String cctname) {
		this.cctname = cctname;
	}

	public List<Guanhuaicc> getGuanhuaiccs() {
		return this.guanhuaiccs;
	}

	public void setGuanhuaiccs(List<Guanhuaicc> guanhuaiccs) {
		this.guanhuaiccs = guanhuaiccs;
	}

	public Guanhuaicc addGuanhuaicc(Guanhuaicc guanhuaicc) {
		getGuanhuaiccs().add(guanhuaicc);
		guanhuaicc.setCctypeBean(this);

		return guanhuaicc;
	}

	public Guanhuaicc removeGuanhuaicc(Guanhuaicc guanhuaicc) {
		getGuanhuaiccs().remove(guanhuaicc);
		guanhuaicc.setCctypeBean(null);

		return guanhuaicc;
	}

}